package com.gc.server.enums;

import lombok.Getter;
import java.util.Arrays;


/**
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Wed Oct 21 16:29:16 CST 2020
 */
@Getter
public enum BusApplyLeaveTypeEnum {


                   THING(0,"事假")
                                    ,
                
            
                   REST(1,"调休")
                                    ,
                
            
                   SICK(2,"病假")
                                    ,
                
            
                   YEAR(3,"年假")
                                    ,
                
            
                   MAT(4,"产假")
                                    ,
                
            
                   PMAT(5,"陪产")
                                    ,
                
            
                   MAR(6,"婚假")
                                    ,
                
            
                   OFF(7,"例假")
                                    ,
                
            
                   DEAD(8,"丧假")
                                    ,
                
            
                   MM(9,"哺乳假")
                
                                ;
            
        
        int index;
        String value;

    public static String[] names(){
        return Arrays.stream(BusApplyLeaveTypeEnum.values()).map(m->m.getValue()).toArray(String[]::new);
    }

    BusApplyLeaveTypeEnum(int index,String value) {
        this.index = index;
        this.value = value;
        }

    public static String indexOf(int idx) {
        return BusApplyLeaveTypeEnum.values()[idx].getValue();
    }

}
